The present invention generally relates to image data processing methods and apparatuses and storage media, and more particularly to an image data processing method and apparatus which are suited for extracting an object having a vague boundary from an image, and to a computer-readable storage medium which stores a program for causing a computer to carry out an image data processing using such an image data processing method.
In multi-media systems and the like, a process is often carried out to extract an arbitrary object within an image. For example, the extracted object is combined with another image to generate a new image. As methods of extracting the object within the image, there is a first method which extracts an image portion which has a predetermined shape and includes the object, such as a circular shape and a rectangular shape, and a second method which generates boundary line information of the object and extracts the object based on the boundary line information. According to the first method, a portion other than the object is also extracted together with the object, and this method is unsuited for a process which extracts the object and combines the extracted object with a background image or the like, because the combined image will appear unnatural. On the other hand, only the object is extracted according to the second method, and this method is therefore suited for the process which extracts the object and combines the extracted object with the background image or the like to obtain the combined image.
However, in the case of an object within a still image, the boundary of the object may not always be clear, depending on the shutter speed and focus used at the time of the image pickup, motion of the camera and the object, the state of the background and the like. In addition, in the case of an object within a moving image, the region of the object may have an inconsistent shape among the frames, and the boundary of t he object may not always be clear, depending on the shutter speed and focus used at the time of the image pickup, motion of the camera and the object, the state of the background and the like.
FIG. 1 is a diagram showing an example of an object having a boundary which is unclear. In FIG. 1, a boundary of a racket 402 held by a tennis player 401 is unclear. In this example shown in FIG. 1, because the racket 402 moves at a high speed, it is vague whether a region 403: is the racket 402, the tennis player 401 or the background.
When extracting the object having the unclear boundary according to the conventional method, the boundary is suitably defined to extract the object from the image regardless of whether the boundary of the object such as the racket 402 is unclear. For this reason, when the object extracted in this manner is combined with the background or the like, there was a problem in that the combined image becomes unnatural due to the conspicuous boundary. In other words, when only a portion which is regarded as the racket 402 and excludes the region 403 is extracted, the motion of the racket 402 is lost. On the other hand, when a portion which is regarded as the racket 402 and includes the region 403 is extracted, the region 403 does not fit into the background of the combined image, to thereby make the combined image look unnatural.
In order to prevent the boundary of the extracted object from becoming conspicuous, it is conceivable to carry out a gradation process with respect to the boundary portion. However, the gradation process will also be carried out with respect to a boundary portion which is originally clear, and there is a problem in that the picture quality of the combined image which is generated by combining the object with the background or the like will deteriorate.
Accordingly, it is a general object of the present invention to provide a novel and useful image data processing method and apparatus and storage medium, in which the problems described above are eliminated.
Another and more specific object of the present invention is to provide an image data processing method and apparatus and storage medium, which can satisfactorily extract an object from an image even if a boundary portion of the object is unclear within the image, and can combine the extracted object with another image to obtain a combined image without deteriorating the picture quality.
Still another object of the present invention is to provide an image data processing method comprising a step of storing an image data which includes a first image data related to a first object and a second image data related to a background or a second object which is different from the first object, a step of storing distribution information which indicates a probability of each pixel data being included in the first image data, with respect to at least one portion of the first image data, and a step of adding the distribution information when extracting the first image data from the image data. According to the image data processing method of the present invention, it is possible to satisfactorily extract the object from the image even if the boundary portion of the object within the image is vague.
The at least one portion of the first image data may include a boundary region of the first object.
The image data processing method may further comprise a step of combining the first image data which is extracted from the image data and is added with the distribution information and a third image data which is related to an arbitrary image, by carrying out a semitransparent process with respect to the at least one portion of the first image data based on the distribution information. In this case, it is also possible to combine the extracted image and another image without deteriorating the picture quality of the combined image.
The image data may be related to a moving image.
A further object of the present invention is to provide an image data processing apparatus comprising a first storage storing an image data which includes a first image data related to a first object and a second image data related to a background or a second object which is different from the first object, a second storage storing distribution information which indicates a probability of each pixel data being included in the first image data, with respect to at least one portion of the first image data, and distribution information adding means for adding the distribution information when extracting the first image data from the image data. According to the image data processing apparatus of the present invention, it is possible to satisfactorily extract the object from the image even if the boundary portion of the object within the image is vague.
The at least one portion of the first image data may include a boundary region of the first object.
The image data processing apparatus may further comprise a combining part combining the first image data which is extracted from the image data and is added with the distribution information and a third image data which is related to an arbitrary image, by carrying out a semitransparent process with respect to the at least one portion of the first image data based on the distribution information. In this case, it is also possible to combine the extracted image and another image without deteriorating the picture quality of the combined image.
The image data may be related to a moving image.
Another object of the present invention is to provide a computer-readable storage medium which stores a program for causing a computer to extract a portion of an image, comprising means for causing the computer to store an image data which includes a first image data related to a first object and a second image data related to a background or a second object which is different from the first object, means for causing the computer to store distribution information which indicates a probability of each pixel data being included in the first image data, with respect to at least one portion of the first image data, and means for causing the computer to add the distribution information when extracting the first image data from the image data. According to the computer-readable storage medium of the present invention, it is possible to satisfactorily extract the object from the image even if the boundary portion of the object within the image is vague.
The at least one portion of the first image data may include a boundary region of the first object.
The computer-readable storage medium may further comprise means for causing the computer to combine the first image data which is extracted from the image data and is added with the distribution information and a third image data which is related to an arbitrary image, by carrying out a semitransparent process with respect to the at least one portion of the first image data based on the distribution information. In this case, it is also possible to combine the extracted image and another image without deteriorating the picture quality of the combined image.
The image data may be related to a moving image.
Therefore, according to the present invention, it is possible to satisfactorily extract the object from the image even if the boundary portion of the object within the image is vague, and it is also possible to combine the extracted object with another image without deteriorating the picture quality of the combined image.
Other objects and further features of the present invention will be apparent from the following detailed description when read in conjunction with the accompanying drawings.